<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/docs.css" type="text/css" rel="stylesheet" />
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script src="../js/prettify.js" type="text/javascript"></script>
<style type="text/css">
<!--
.STYLE1 {font-weight: bold}
-->
</style>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
<div id="api-info-block">
<div class="api-level">H3C CAS云管理平台</div>
</div>
<div id="jd-header">
<h1>查询主机上的PCI设备</h1>
</div>
<div id="jd-content">
<div class="jd-descr">
<p>查询指定主机id的PCI设备。</p>
<h2><a name="uri"></a>接口 URI</h2>
<p>/cas/casrs/pci/{hostId}</p>
<h2><a name="access"></a>访问方法</h2>
<dl>
  <dt><b>HTTP 方法</b></dt>
  <dd>GET</dd>
  <dt><b>消息体</b></dt>
  <div class="source">
  	<pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;hostdev&gt;<br>  &lt;id&gt;3&lt;/id&gt;<br>  &lt;name&gt;cvk04&lt;/name&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_0a_00_2&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x8031&lt;/productId&gt;<br>    &lt;product&gt;8300 Series 10GbE Converged Network Adapter (FCoE)&lt;/product&gt;<br>    &lt;bus&gt;10&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;2&lt;/function&gt;<br>  &lt;/pci&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_04_00_0&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x2532&lt;/productId&gt;<br>    &lt;product&gt;ISP2532-based 8Gb Fibre Channel to PCI Express HBA&lt;/product&gt;<br>    &lt;bus&gt;4&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;0&lt;/function&gt;<br>  &lt;/pci&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_04_00_1&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x2532&lt;/productId&gt;<br>    &lt;product&gt;ISP2532-based 8Gb Fibre Channel to PCI Express HBA&lt;/product&gt;<br>    &lt;bus&gt;4&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;1&lt;/function&gt;<br>  &lt;/pci&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_0a_00_3&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x8031&lt;/productId&gt;<br>    &lt;product&gt;8300 Series 10GbE Converged Network Adapter (FCoE)&lt;/product&gt;<br>    &lt;bus&gt;10&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;3&lt;/function&gt;<br>  &lt;/pci&gt;<br>&lt;/hostdev&gt;  	</pre>
  </div>
</dl>
<dt><a name="detail"></a><b>元素含义</b></dt>
<table class="jd-sumtable" id="pubmethods">
  <tbody>
    <tr>
      <th colspan="2"><span class="prettyprint lang-xml">hostdev</span>各子元素</th>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>主机ID。
        <div class="jd-descrdiv">整数（Long）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">主机名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
</table>
<table class="jd-sumtable" id="pubmethods">
  <tbody>
    <tr>
      <th colspan="2"><span class="prettyprint lang-xml">pci</span>各子元素</th>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">name</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">usb名称。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">vendorId</span></td>
      <td align="center" class="jd-linkcol"><span class="sympad">供应商ID。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">value</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>usb信息。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">vendor</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>供应商。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">productId</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>产品ID。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">product</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>产品名称。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">bus</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>总线信息。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">slot</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>设备类型。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">function</span></td>
      <td class="jd-linkcol"><span class="sympad"></span>设备类型。
        <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
</table>
<h2><a name="result"></a>返回结果</h2>
<dl>
  <dt><b>状态码</b></dt>
  <dd>
  <ul>
    <li>200(OK)：成功。</li>
  </ul>
  </dd>
  <dt><b>消息头</b></dt>
  <br>
  <pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Set-Cookie: JSESSIONID=23844B494C441FAAF93C53EB43F84324; Path=/cas<br>Content-Type: application/xml<br>Content-Length: 1414<br>Date: Thu, 18 Sep 2014 02:51:03 GMT<br>Server: H3C-CVM  </pre>
</dl>

<h2><a name="example"></a>应用举例</h2>
    <p>1.查询指定主机id为3的PCI设备。</p>
    <dl>
      <dt><b>请求</b></dt>
      <div class="source">
        <pre class="prettyprint lang-xml">GET http://localhost:8080/cas/casrs/host/usb/3
accept: application/xml  </pre>
      </div>
      <dt><b>回应</b></dt>
      <div class="source"><pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;hostdev&gt;<br>  &lt;id&gt;3&lt;/id&gt;<br>  &lt;name&gt;cvk04&lt;/name&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_0a_00_2&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x8031&lt;/productId&gt;<br>    &lt;product&gt;8300 Series 10GbE Converged Network Adapter (FCoE)&lt;/product&gt;<br>    &lt;bus&gt;10&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;2&lt;/function&gt;<br>  &lt;/pci&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_04_00_0&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x2532&lt;/productId&gt;<br>    &lt;product&gt;ISP2532-based 8Gb Fibre Channel to PCI Express HBA&lt;/product&gt;<br>    &lt;bus&gt;4&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;0&lt;/function&gt;<br>  &lt;/pci&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_04_00_1&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x2532&lt;/productId&gt;<br>    &lt;product&gt;ISP2532-based 8Gb Fibre Channel to PCI Express HBA&lt;/product&gt;<br>    &lt;bus&gt;4&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;1&lt;/function&gt;<br>  &lt;/pci&gt;<br>  &lt;pci&gt;<br>    &lt;name&gt;pci_0000_0a_00_3&lt;/name&gt;<br>    &lt;vendorId&gt;0x1077&lt;/vendorId&gt;<br>    &lt;vendor&gt;QLogic Corp.&lt;/vendor&gt;<br>    &lt;productId&gt;0x8031&lt;/productId&gt;<br>    &lt;product&gt;8300 Series 10GbE Converged Network Adapter (FCoE)&lt;/product&gt;<br>    &lt;bus&gt;10&lt;/bus&gt;<br>    &lt;slot&gt;0&lt;/slot&gt;<br>    &lt;function&gt;3&lt;/function&gt;<br>  &lt;/pci&gt;<br>&lt;/hostdev&gt;<br></pre>
      </div>
    </dl>
</div>
</div>
</div>
</body>
</html>